<?php defined('InTuntronKJ') or exit('Access Invalid!');?>



<!--crumbs start-->
<div class="crumbs">
    <input  type="hidden" id ="pidUserName"/>
    <ul>
        <li><span class="strong">当前位置：</span></li>
        <li><a href="#LotteryHall">首页</a></li>
        <li><a href="#MemberManage">推广链接</a></li>
        <li><div id="li_hierarchy"></div></li>
    </ul>
    <div class="clear"></div>
</div>
<!--crumbs end-->

<!--list_main start-->
<div class="list_main">
    <!--list_header start-->
    <div class="list_header">

        <!--list_nav start-->
        <div class="list_nav">
            <ul>
                <li><a href="#MemberManage">会员管理</a></li>
                <li><a href="#MemberManage&op=TeamGamerecord">游戏记录</a></li>
        		<li><a href="#MemberManage&op=TeamRprofitloss">盈亏报表</a></li>
        		<li><a href="#MemberManage&op=TeamCoinAll">团队统计</a></li>
        		<li><a href="#MemberManage&op=TeamCoin">账变记录</a></li>
        		<li><a href="#MemberManage&op=TeamRecharge">充值记录</a></li>
        		<li><a href="#MemberManage&op=TeamCashRecord">提现记录</a></li>
        		<li class="current"><a href="#MemberManage&op=Links">推广链接</a></li>
            </ul>
            <div class="clear"></div>
        </div>
        <!--list_nav end-->

        <!--list_sort start-->
        <div class="list_sort">
            <div class="list_sort_item">
                <div class="base_button green_button">
                        <button class="gen_link">添加链接</button>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <!--list_sort end-->

    </div>
    <!--list_header end-->

    <!--list_table satrt-->
    <div class="list_table">
        <table>
            <thead>
                <tr>
                    <th style="width: 40px;">序号</th>
                    <th style="width: 40px;">类型</th>
                    <th>返点</th>
                    <th>不定位返点</th>
                    <th>操作</th>
                </tr>
            </thead>
                <tbody>
                	<?php if(!empty($output['user_links']) && is_array($output['user_links'])){?>    
                	<?php foreach($output['user_links'] as $key=>$value){?>            	
                	<tr data-id="<?php echo $key+1?>">
                    	<td class="center"><span class="gry"><?php echo $value['lid'] ?></span></td>
                        <td class="center"><span class="base_blue"><?php echo $value['type']==0?'会员':'代理' ?></span></td>
                        <td class="center"><span class="base_blue"><?php echo number_format($value['fanDian'],1)?>%</span></td>
                        <td class="center"><span class="base_blue"><?php echo number_format($value['fanDianBdw'],1)?>%</span></td>
						<td class="center td_options">
							<a class="link_edit" id="<?php echo $value['lid'] ?>" ut="<?php echo $value['type']==0?'会员':'代理' ?>" rt="<?php echo number_format($value['fanDian'],1)?>" rf="<?php echo $output['userinfo']['fanDian']?>" bt="<?php echo number_format($value['fanDianBdw'],1) ?>">修改</a> 
							| 
							<a class="search_link" id="<?php echo $value['lid'] ?>" rt="<?php echo number_format($value['fanDian'],1)?>" rf="<?php echo $output['userinfo']['fanDian']?>" bt="<?php echo number_format($value['fanDianBdw'],1) ?>">获取链接</a> 
							| 
							<a class="link_del" id="<?php echo $value['lid'] ?>">删除</a>
                        </td>
                    </tr>
                    <?php }?>
                	<?php }else{?>
                    <tr>
                        <td colspan="5">
                            <!--no_result start-->
                            <div class="no_result user_null">
                                <div class="nr_icon">&nbsp;</div>
                                <div class="nr_info">
                                    <h4>没有推广链接可以显示！</h4>
                                    <p>没有找到您的推广链接！</p>
                                </div>
                            </div>
                            <!--no_result end-->
                        </td>
                    </tr>
                    <?php }?>
                </tbody>
        </table>
    </div>
    <!--list_table end-->

</div>
<!--list_main end-->

<!--editor_lower start-->
<div class="dialog" id="editor_link" style="width:500px">
  <div class="dialog_main">
    <div class="dialog_header">
      <h4>修改注册链接</h4>
      <div class="dialog_close"><span>关闭</span></div>
    </div>
    <div class="dialog_body">
      <div class="add_lower_form">
        <table>
          <tbody>
            <tr>
              <td style="width:70px;">类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型:</td>
              <td><div class="base_radio_group">
                  <div class="base_radio">
                  	<input type="hidden" id="editLinkId" value="">
                    <label for="elut_a" id="editUserType"></label>
                  </div>
                  <div class="clear"></div>
                </div></td>
              <td style="width:180px;">&nbsp;</td>
            </tr>
            <tr>
                <td>返&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点:</td>
                <td>
                	<div class="base_text" id="editUserTip">
    					<input id="editReturnPoint" />
					</div>
				</td>
              	<td>
              		<div class="form_tips">
              			<span id="el_rebate_steping_tips">0.0%&nbsp;&nbsp;-&nbsp;&nbsp;<?php echo $output['userinfo']['fanDian']?>%</span>
              		</div>
              	</td>
            </tr>
            <tr>
                <td>不定位返点:</td>
                <td>
                	<div class="base_text" id="editUserTip">
    					<input id="editNotReturnPoint" />
					</div>
				</td>
              	<td>
              		<div class="form_tips">
              			<span id="el_rebate_steping_tips">0.0%&nbsp;&nbsp;-&nbsp;&nbsp;<?php echo $output['userinfo']['fanDianBdw']?>%</span>
              		</div>
              	</td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><div class="base_button_group">
                  <div class="base_button">
                    <input type="button" id="el_link_edit" value="保存修改" />
                  </div>
                  <div class="base_button">
                    <input type="button" id="el_chanle" value="取消" />
                  </div>
                </div></td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>
<!--editor_lower end-->
<!--gen_link start-->
<div class="dialog" id="genlink_lower" style="width:400px">
    <div class="dialog_main">
        <div class="dialog_header">
            <h4>添加推广链接</h4>
            <div class="dialog_close"><span>关闭</span></div>
        </div>
        <div class="dialog_body">
            <div class="add_lower_form">
                <table>
                    <tbody>
                    	<tr>
                            <td style="width: 100px;">类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型:</td>
                            <td>
                                <input name="addUserType" type="radio" value="1"/>
                                <label>代理</label>
                                <input name="addUserType" type="radio" value="0" checked />
                                <label>会员</label></td>
                       
                        </tr>
                        <tr>
                            <td>返&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点:</td>
                            <td>
                                <div class="base_text" id="genlinkTip">
                                    <input id="genlinkReturnPoint" value="0"/>
                                </div>
                            </td>
                            <td>
                            	<div class="form_tips">
                            		<input id="fanDian" value="<?php echo $output['userinfo']['fanDian']?>" type="hidden">
                            		<span>0.0%&nbsp;&nbsp;-&nbsp;&nbsp;<?php echo $output['userinfo']['fanDian']?>%</span>
                            	</div>
                            </td>
                        </tr>
                        <tr>
                            <td>不定位返点:</td>
                            <td>
                                <div class="base_text" id="genlinkTip">
                                    <input id="genlinkNotReturnPoint" value="0"/>
                                </div>
                            </td>
                            <td>
                            	<div class="form_tips">
                            		<input id="fanDianBdw" value="<?php echo $output['userinfo']['fanDianBdw']?>" type="hidden">
                            		<span>0.0%&nbsp;&nbsp;-&nbsp;&nbsp;<?php echo $output['userinfo']['fanDianBdw']?>%</span>
                            	</div>
                            </td>
                        </tr>
                        
                        <tr>
                            <td>&nbsp;</td>
                            <td>
                                <div class="base_button_group">
                                    <div class="base_button">
                                        <input type="button" id="el_link_cofirm" value="添加" />
                                    </div>
                                    <div class="base_button">
                                        <input type="button" id="el_link" value="取消" />
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<!--gen_link end-->

<!--search_link_start-->
<div class="dialog" id="search_link" style="width:500px">
  <div class="dialog_main">
    <div class="dialog_header">
      <h4>获取注册链接</h4>
      <div class="dialog_close"><span>关闭</span></div>
    </div>
    <div class="dialog_body">
      <div class="add_lower_form">
        <table>
          <tbody>
            <tr>
                <td>返&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;点:</td>
                <td>
                	<div class="base_text" id="searchUserTip">
    					<input id="searchReturnPoint" />
					</div>
				</td>
              	<td>
              		<div class="form_tips">
              			<span id="el_rebate_steping_tips">0.0%&nbsp;&nbsp;-&nbsp;&nbsp;<?php echo $output['userinfo']['fanDian']?>%</span>
              		</div>
              	</td>
            </tr>
            <tr>
                <td>不定位返点:</td>
                <td>
                	<div class="base_text" id="searchUserTip">
    					<input id="searchNotReturnPoint" />
					</div>
				</td>
              	<td>
              		<div class="form_tips">
              			<span id="el_rebate_steping_tips">0.0%&nbsp;&nbsp;-&nbsp;&nbsp;<?php echo $output['userinfo']['fanDianBdw']?>%</span>
              		</div>
              	</td>
            </tr>
			<tr>
                <td>链&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;接:</td>
                <td>
                   <span data-url="" id="spanlink"></span>
                </td>
                <td></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><div class="base_button_group">
                  <div class="base_button">
                    <input type="button" id="CopyrtLink" value="复制" />
                  </div>
                  <div class="base_button">
                    <input type="button" id="el_link_chanle" value="取消" />
                  </div>
                </div></td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>
<!--search_link_end-->
<script type="text/javascript">
	var memberManage_NameOrNickName = "<?php echo $output['param']['nickname'] ?>";
	var memberManage_Type = "<?php echo $output['param']['type'] ?>"
    init_memberManage();

</script>
